<?php

if (validation_errors()) :
?>
<section class="content-header">
<div class='alert alert-block alert-error fade in'>
    <a class='close' data-dismiss='alert'>&times;</a>
    <h4 class='alert-heading'>
        <?php echo lang('buildings_errors_message'); ?>
    </h4>
    <?php echo validation_errors(); ?>
</div>
</section>
<?php
endif;

$id = isset($buildings->id) ? $buildings->id : '';

?>

<section class="content-header">
    <h1>添加专题</h1>
</section>
<section class="content">
<style type="text/css">
    .form-group-m-b{margin-bottom: 15px;}
    em{display: block;height: 15px;}
    .form1_col .col-xs-2{padding-right: 0;}
    .checkbox-1{margin-top:25px ;}
    .thumbnail-lp{width: 100%;border: 1px solid #DFDFDF; position: relative;}
    .thumbnail-lp img,.lp-pic img,.door_pic img{width: 100%;margin: 0 auto;}
    .lp-pic{width: 100%;border: 1px solid #DFDFDF;min-height: 250px;position: relative;}
    .lp-pic .form-control{width: 90%; margin: 10px auto;}
    .door_pic{width: 49%;border: 1px solid #DFDFDF; min-height: 200px;position: relative;}
    .lptype{display: none;}
    .addpicbg{cursor: pointer;position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);-webkit-transform:  translate(-50%,-50%);}
    .pic_delete{position: absolute;right: 10px; top: 10px;display: none;}
    .text-danger:hover{color: #dd4b39;}
    #link_box{padding:10px 0 0 0;font-size:14px;font-weight:bold;}
    #link {text-decoration: underline;}
    .head_pic{width: 150px;border: 1px solid #DFDFDF; height: 150px;position: relative;margin-left: 15px;}
    .author_pic{width:55px;height:55px; margin-left:15px;border-radius: 50%;overflow: hidden;position: relative;}
    .author_pic img{position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);-webkit-transform:  translate(-50%,-50%);}
    #status{width: 150px;}
</style>
<script>

</script>
  <div class="row">
    <!-- form start -->
<!--     <?php //echo form_open($this->uri->uri_string(), 'class="form-horizontal" onkeydown="if(event.keyCode==13){return false;}"'); ?> -->
    <div class="col-md-9">
                <div class="box-body" style="padding: 0;">
                    <div class="clearfix">
                              <input id='title' type='text' required='required' name='title' maxlength='225'  class="form-control" placeholder="请输入标题" style="font-size:16px" value="<?php echo set_value('title', isset($news->title) ? $news->title : ''); ?>" />
                    </div>
                    <textarea id="editor1" name="editor1" class="editor1" rows="10" cols="80">
                    </textarea>
                </div>
            <em></em>
          <!-- SEO -->
          <div class="box box-primary">
            <div class="box-header with-border">
              <h3 class="box-title">搜索引擎</h3>
            </div>
            <!-- /.box-header -->
            <div class="box-body">
                <div class="form-group">
                    <?php echo form_label('标题', 'seo_title', array('class'=>'col-sm-2 control-label')); ?>
                    <div class="col-sm-10">
                    <input id='seo_title' type='text' name='seo_title' maxlength='100' class="form-control" value="<?php echo set_value('seo_title', isset($subject->seo_title) ? $subject->seo_title : ''); ?>" />
                    </div>
                </div>
            </div>
            <div class="box-body">
                <div class="form-group">
                    <?php echo form_label('关键词', 'seo_keywords', array('class'=>'col-sm-2 control-label')); ?>
                    <div class="col-sm-10">
                    <input id='seo_keywords' type='text' name='seo_keywords' maxlength='100' class="form-control" value="<?php echo set_value('seo_keywords', isset($subject->seo_keywords) ? $subject->seo_keywords : ''); ?>" />
                    </div>
                </div>
            </div>
            <div class="box-body">
                <div class="form-group">
                    <?php echo form_label('描述', 'seo_description', array('class'=>'col-sm-2 control-label')); ?>
                    <div class="col-sm-10">
                    <textarea id='seo_description' name='seo_description' class="form-control"><?php echo set_value('seo_description', isset($subject->seo_description) ? $subject->seo_description : ''); ?></textarea>
                    </div>
                </div> 
            </div>
              <!-- /.box-body -->
          </div>
          <!-- SEO end -->

    </div>

        <div class="col-md-3">
        <!--发布beg-->
        <div class="box box-danger">
            <div class="box-body form-horizontal">
                <div class="box-body">
                    <button action="1"  id="sub" class="col-xs-12 btn btn-danger btn-lg sub_botton">保存</button>
                </div>
                <div class="box-body">选择状态：</div>
                <div class="clearfix">
                    <div class="col-xs-12">
                        <select class="form-control select2" name="fb_status" id="fb_status">
                            <option value="2">即时发布</option>
                            <option value="1">暂存草稿</option>
                        </select>
                    </div>
                </div>
                <div class="box-body">撰写于：<?php echo date("Y-m-d H:i",time());?></div>
              </div>
              <!-- /.box-body -->
         </div>
        <!--发布end-->  
                    <!--城市beg-->
           <div class="box box-danger">
            <div class="box-header with-border">
              <h3 class="box-title">城市</h3>
              <button type="button" class="btn btn-box-tool pull-right" data-widget="collapse">
                    <i class="fa fa-minus"></i>
              </button>
            </div>
              <div class="box-body form-horizontal">
                <div class="form-group">
                    <div class="col-sm-12">
                       <select class="form-control select2" style="width: 100%;" id="city" name="city">
                       <?php if(isset($city) && !empty($city)) : ?>
                             <?php foreach ($city as $key=>$value) : ?>
                                <option code="<?php echo $value->code; ?>" value="<?php echo $value->area_id; ?>"><?php echo $value->area_name; ?></option>
                              <?php endforeach; ?>
                        <?php endif;?>
                      </select>
                    </div>
                </div>
                </div>
              </div>
          <!--城市end-->  
        <!--缩略图beg-->
        <div class="box box-danger">
            <div class="box-header with-border">
                <h3 class="box-title">缩略图</h3>
                <button type="button" class="btn btn-box-tool pull-right" data-widget="collapse">
                    <i class="fa fa-minus"></i>
                </button>
            </div>
            <div class="box-body " id="container">
                       <div class="thumbnail-lp pic_parent">

                        </div>
                <em id="pic_em"></em>
                <a href="#" id="source_pic">设置缩略图</a>
            </div>
        </div>

         

            <!-- /.box-header -->
              <div class="box-body form-horizontal">
                <div class="form-group">
                    <div class="col-sm-12">
                        <img src="<?php echo Template::theme_url('images/avatar5.png'); ?>" id="building_thumb_img" style="width: 100%; display: none;" />
                        <input type="hidden" name="building_thumb_url" id="building_thumb_url" value="" style="display:none;" />
                    </div>
                </div>
                
              </div>
              <!-- /.box-body -->
          </div>

</section>
